<?php

include '../DB/dbConnection.php';

$result=array();

if ($_POST){
		
	$query = "UPDATE student SET roll_number=?,name=?,gender=?,blood=?,height=?,weight=?,father_name=?,father_qualification=?,father_occupation=?,mother_name=?,mother_qualification=?,mother_occupation=?,guardian_name=?,guardian_qualification=?,guardian_occupation=?,city=?,village=?,email=?,district=?,landline=?,state=?,cell_number=?,address=?,image=? WHERE id=?";
	
	$stmt = $conn->prepare($query);
	$stmt->bind_param("isssssssssssssssssssssssi",$_POST['roll_number'],$_POST['name'],$_POST['gender'],$_POST['blood'],$_POST['height'],$_POST['weight'],$_POST['father_name'],$_POST['father_qualification'],$_POST['father_occupation'],$_POST['mother_name'],$_POST['mother_qualification'],$_POST['mother_occupation'],$_POST['guardian_name'],$_POST['guardian_qualification'],$_POST['guardian_occupation'],$_POST['city'],$_POST['village'],$_POST['email'],$_POST['district'],$_POST['landline'],$_POST['state'],$_POST['cell_number'],$_POST['address'],$_POST['image'],$_POST['id']);
	$success = $stmt->execute();
	$stmt->close();
	$conn->close();
	
	if($success)
		$result['error']='false';
	else
		$result['error']='true';
}
else
{
	$result['error']='true';
}

echo json_encode($result);

?> 
